package 实践.class_05;

import java.util.Scanner;

public class Demo_02 {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int value = in.nextInt();
        System.out.println(sumDigits(value));
        in.close();
    }

    private static int sumDigits(int value) {
        int sum = 0;
        while (value > 0) {
            sum += value % 10;
            value /= 10;
        }
        return sum;
    }
}
